﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Deviseur_Cs2i_Car
{
    class VoiOption
    {
        int NumVoi;
        double NumOption;

        public VoiOption() { }
        public VoiOption(int NumVoi)
        {
            this.NumVoi = NumVoi;
        }
        public VoiOption(double NumOption)
        {
            this.NumOption = NumOption;
        }
        public VoiOption(int NumVoi, double NumOption)
        {
            this.NumVoi = NumVoi;
            this.NumOption = NumOption;
        }
        public int get_NumVoi()
        {
            return this.NumVoi;
        }
        public double get_NumOption()
        {
            return this.NumOption;
        }
        public void set_NumVoi(int NumVoi)
        {
            this.NumVoi = NumVoi;
        }
        public void set_NumOption(double NumOption)
        {
            this.NumOption = NumOption;
        }
        public void new_VoiOption()
        {
            Program.Db.Execute("INSERT INTO Voi_Option (NumVoi, NumOption) VALUES ('" + this.NumVoi + "', '" + this.NumOption + "')");
        }
        public void modify_VoiOption()
        {
            Program.Db.Execute("UPDATE Voi_Option SET NumVoi = '" + this.NumVoi + "', NumOption = '" + this.NumOption + "' WHERE NumVoi = " + this.NumVoi+" AND NumOption = "+this.NumOption);
        }
        public void delete_VoiOption(int NumVoi, double NumOption)
        {
            Program.Db.Execute("DELETE FROM Voi_Option WHERE NumVoi = " + NumVoi+" AND NumOption = "+NumOption);
        }
    }
}
